# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-aiohttp-retry
_pkgreal=aiohttp_retry
pkgver=2.9.0
pkgrel=0
pkgdesc="Simple retry client for aiohttp."
url="https://github.com/inyutin/aiohttp_retry"
arch="noarch"
license="MIT"
depends="
	py3-aiohttp
	py3-yarl
"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-pytest
	py3-pytest-aiohttp
	py3-pytest-cov
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/inyutin/aiohttp_retry/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -v
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
a0a898d0af6e7a2d84683cda4bc746199143df5c73aa80a48ac8d0d431d387a828fd749f6aa3f08ba70cf949b92b3b31070837f5c7fc544644fc28a37c5202e2  py3-aiohttp-retry-2.9.0.tar.gz
"
